package cn.source.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import cn.source.common.annotation.Excel;
import cn.source.common.core.domain.BaseEntity;

import java.util.List;

/**
 * 数据库备份任务对象 db_task
 *
 * @author sourcebyte.vip
 * @date 2025-02-21
 */
public class DbTask {
    private static final long serialVersionUID = 1L;

    /**
     * 名称
     */
    @Excel(name = "名称")
    private String name;

    /**
     * 数据库连接名称
     */
    @Excel(name = "数据库连接名称")
    private String connName;

    /**
     * 导出格式 csv sql
     */
    @Excel(name = "导出格式 csv sql")
    private String format;

    /**
     * 导出的表名称，以,作为分隔符号
     */
    @Excel(name = "导出的表名称，以,作为分隔符号")
    private String tables;

    /**
     * 定时任务对应的任务号
     */
    @Excel(name = "定时任务对应的任务号")
    private Long qrtzJobId;
    /**
     * 最大备份数量
     */
    private Integer maxNum;

    //导出的额外的参数
    private String extraParams;

    private String extraParamsH5;

    private String transToConnList;//自动转存数据库

    private String emails;

    public String getEmails() {
        return emails;
    }

    public void setEmails(String emails) {
        this.emails = emails;
    }

    public String getTransToConnList() {
        return transToConnList;
    }

    public void setTransToConnList(String transToConnList) {
        this.transToConnList = transToConnList;
    }

    public void setExtraParamsH5(String extraParamsH5) {
        this.extraParamsH5 = extraParamsH5;
    }

    public String getExtraParamsH5() {
        return extraParamsH5;
    }

    public String getExtraParams() {
        return extraParams;
    }

    public void setExtraParams(String extraParams) {
        this.extraParams = extraParams;
    }

    public String getJobGroup() {
        return jobGroup;
    }

    public void setJobGroup(String jobGroup) {
        this.jobGroup = jobGroup;
    }

    /**
     * 主键
     */
    private Long id;

    private String status;

    private String cronExpression;
    //任务分组
    private String jobGroup;

    public Integer getMaxNum() {
        return maxNum;
    }

    public void setMaxNum(Integer maxNum) {
        this.maxNum = maxNum;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setConnName(String connName) {
        this.connName = connName;
    }

    public String getConnName() {
        return connName;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public String getFormat() {
        return format;
    }

    public void setTables(String tables) {
        this.tables = tables;
    }

    public String getTables() {
        return tables;
    }

    public void setQrtzJobId(Long qrtzJobId) {
        this.qrtzJobId = qrtzJobId;
    }

    public Long getQrtzJobId() {
        return qrtzJobId;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("name", getName())
                .append("connName", getConnName())
                .append("format", getFormat())
                .append("tables", getTables())
                .append("qrtzJobId", getQrtzJobId())
                .append("id", getId())
                .toString();
    }
}
